import RequestHttp from '@/utils/http'
import { LoginParams, CaptcheResult, LoginResult } from './model/loginModel'

enum Api {
  Captcha = '/api/captcha',
  Login = '/api/login',
}

export const captcha = () => {
  return RequestHttp.get<CaptcheResult>(Api.Captcha)
}

export const login = (params: LoginParams) => {
  return RequestHttp.post<LoginResult>(Api.Login, params)
}
